/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package studentinforedux;

import java.io.IOException;
import java.util.Scanner;
import javax.xml.bind.JAXBException;

/**
 *
 * @author k00112173
 */
public class Menu {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws JAXBException, IOException {
        
        int option;
            do{
                
                Scanner input = new Scanner(System.in);

                System.out.println("1.  Write Test Student To DB !!DO NOT USE!!");
                System.out.println("2.  Display Stored Students");
                System.out.println("3.  Add Student To DB");
                System.out.println("4.  Delete Student From DB");
                System.out.println("5.  Sort Students By Name");
                System.out.println("6.  Sort By K Number");
                System.out.println("7.  Find By K Number");
                System.out.println("0.  Exit");
                System.out.println("Enter Option:");
                
                option = input.nextInt();


                    switch(option){
                        case 0:
                            break;
                        case 1:
                                Bits.writeTest();
                            break;
                        case 2: 
                                Bits.printStudent(ReadWrite.read());
                            break;
                        case 3:
                                Bits.addStudent();
                            break;
                        case 4:
                                Bits.deleteStudent();
                            break;
                        case 5:
                                Bits.sorter(0);
                            break;
                        case 6:
                                Bits.sorter(1);
                            break;
                        case 7:
                                Bits.find();
                            break;
                        default:
                            System.out.println("not a valid option");
                            break;
                    }
                }while(option!=0);
    }
}
